package diertian;

import java.util.Scanner;

public class liannxi7 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("所有的水仙花数为：");
        int m,sum;
        int i,j,k;
        for (m=100;m<1000;m++){
            i=m/100;
            j=m%100/10;
            k=m%10;
            sum =i*i*i+j*j+k*k*k;
            if(sum==m){
                System.out.println("水仙花数=" + sum);
            }
        }
    }
}
